<?php

$meinv = imageCreateFrompng('meinv.png');

$mw = imagesx($meinv);
$mh = imagesy($meinv);

$big = imagecreatetruecolor($mw*0.8,$mh*0.8);
$mid = imagecreatetruecolor($mw*0.5,$mh*0.5);
$min = imagecreatetruecolor($mw*0.1,$mh*0.1);


imagecopyresized ( $big , $meinv , 0 , 0 , 0 , 0 ,  $mw*0.8 , $mh*0.8 , $mw , $mh );
imagecopyresized ( $mid , $meinv , 0 , 0 , 0 , 0 ,  $mw*0.5 , $mh*0.5, $mw , $mh );
imagecopyresized ( $min , $meinv , 0 , 0 , 0 , 0 ,  $mw*0.1 , $mh*0.1 , $mw , $mh );



// 6  保存/输出
header("Content-type: image/png");
imagepng($big,"./img/big".uniqid().'.png');
imagepng($mid,"./img/mid".uniqid().'.png');
imagepng($min,"./img/min".uniqid().'.png');
// imagepng($meinv);

